namespace Bosphorus.Migrator.Dialect.ViewEngine
{
    public class TemplatePathBuilder
    {
        private readonly string folderBase;
        private readonly string extension;

        public TemplatePathBuilder(string folderBase, string extension)
        {
            this.folderBase = folderBase;
            this.extension = extension;
        }

        public string Build<TModel>(string action)
        {
            string modelName = typeof (TModel).Name;
            string templateName = string.Format("{0}.{1}.{2}", modelName, action, extension);
            string templatePath = string.Concat(folderBase, templateName);

            return templatePath;
        }
    }
}